﻿using System;

namespace Tauren.Form.Entity.Enum
{
    public class ErrorType
    {
        /// <summary>
        /// 数据库服务器错误
        /// </summary>
        public const int SQL_ERROR = 1001;
        /// <summary>
        /// 成功时编码
        /// </summary>
        public const int SUCCESS_CODE = 200;

        /// <summary>
        /// 当前账号登录成功！祝您使用愉快!
        /// </summary>
        public const int BUSINESS_LOGIN_SUCCESSED = 2001;

        /// <summary>
        /// 返回数据类型错误
        /// </summary>
        public const int RESPONDATATYPE_ERROR = 3001;

        public const int PERMISSIONSEXCEPTION = 4033;



        /// <summary>
        /// 500服务器错误
        /// </summary>
        public const int SERVER_ERROR = 500;
        /// <summary>
        /// 参数异常
        /// </summary>
        public const int SERVER_PARMETER = 5001;
        /// <summary>
        /// 空指针异常
        /// </summary>
        public const int SERVER_NULL_POINTER = 5002;

        /// <summary>
        /// 当前接口不支持当前版本
        /// </summary>
        public const int NOT_FOUND_APIVERSION = 5003;

        #region 业务数据错误
        /// <summary>
        /// 租户用户信息重复
        /// </summary>
        public const int BUSINESS_TENANTINFO_REPEAT_CODE = 601;
        /// <summary>
        /// 未找到租户用户信息
        /// </summary>
        public const int BUSINESS_NOT_TENANTINFO = 602;


        #region 登录
        /// <summary>
        /// 未输入登录账号
        /// </summary>
        public const int BUSINESS_NOT_FOUND_LOGIN = 4001;
        /// <summary>
        /// 请输入用户名
        /// </summary>
        public const int BUSINESS_EMPTY_LOGIN_ACCOUNT = 4002;
        /// <summary>
        /// 请输入密码
        /// </summary>
        public const int BUSINESS_EMPTY_LOGIN_PASSWORD = 4003;
        /// <summary>
        /// 当前用户名不存在!请联系管理员
        /// </summary>
        public const int BUSINESS_EMPTY_NOTFOUND_ACCOUNTINFO = 4004;
        /// <summary>
        /// 当前用户密码不正确!请重新输入
        /// </summary>
        public const int BUSINESS_EMPTY_LOGIN_PASSWORD_ERROR = 4005;
        /// <summary>
        /// 登录令牌未成功生成，请联系管理员!
        /// </summary>
        public const int BUSINESS_EMPTY_LOGIN_TOKEN_ERROR = 4006;
        /// <summary>
        /// 当前员工基本信息不存在!请联系管理员
        /// </summary>
        public const int BUSINESS_EMPTY_NOTFOUND_EMPLOYEEINFO = 4007;

        /// <summary>
        /// 未输入账号信息
        /// </summary>
        public const int BUSINESS_LOGIN_SECRET_ERROR = 4008;
        public const int BUSINESS_WITHOUT_PERMISSION = 4011;
        #endregion

        #region 员工基本信息
        /// <summary>
        /// 请输入员工基本数据
        /// </summary>
        public const int BUSINESS_EMPLOYEE_NOTFOUND_INPUT_DATA_ERROR = 4101;

        /// <summary>
        /// 员工基本信息重复
        /// </summary>
        public const int BUSINESS_EMPLOYEE_REPEAT_CODE = 4102;
        /// <summary>
        /// 未查询到当前员工的基本信息!
        /// </summary>
        public const int BUSINESS_EMPLOYEE_DB_NOT_FOUND = 4103;

        #endregion

        #region 账号
        /// <summary>
        /// 请输入账号信息数据
        /// </summary>
        public const int BUSINESS_ACCOUNT_NOTFOUND_INPUT_DATA_ERROR = 4201;
        /// <summary>
        /// 账户信息重复
        /// </summary>
        public const int BUSINESS_ACCOUNTINFO_REPEAT_ACCOUNT = 4202;
        /// <summary>
        /// 未查询到当前账号的基本信息!
        /// </summary>
        public const int BUSINESS_ACCOUNT_DB_NOT_FOUND = 4203;
        /// <summary>
        /// 重置密码成功!
        /// </summary>
        public const int BUSINESS_ACCOUNT_RESET_PASSWORD_SUCCESS = 4206;
        /// <summary>
        /// 重置密码失败!
        /// </summary>
        public const int BUSINESS_ACCOUNT_RESET_PASSWORD_SAVE_FAILURE = 4207;
        #endregion 
        #region 菜单
        public const int BUSINESS_MENU_NOTFOUND_INPUT_DATA_ERROR = 4401;
        /// <summary>
        ///菜单信息重复
        /// </summary>
        public const int BUSINESS_MENU_REPEAT_ACCOUNT = 4402;
        /// <summary>
        /// 未查询到菜单信息!
        /// </summary>
        public const int BUSINESS_MENU_DB_NOT_FOUND = 4403;

        /// <summary>
        /// 查询到子菜单，请先删除子菜单然后再删除该菜单！
        /// </summary>
        public const int BUSINESS_MENU_UNREMOVE = 4404;

        /// <summary>
        /// 保存角色成功!
        /// </summary>
        public const int BUSSINESS_MEEU_ROLES_SUCCESS = 4422;

        /// <summary>
        /// 保存角色失败!
        /// </summary>
        public const int BUSSINESS_MENU_ROLES_FAILURE = 4450;
        #endregion
        #endregion
        #region 文件上传
        /// <summary>
        /// 上传文件大小超过限制大小
        /// </summary>
        public const int BUSSINESS_UPLOAD_FILE_SIZE = 4913;
        /// <summary>
        /// 不支持此文件类型,仅支持：.gif,.jpg,.jpeg,.png,.bmp,.docx,.xlsx,.csv,.pptx,.txt,.pdf
        /// </summary>
        public const int BUSSINESS_UPLOAD_FILE_SUFFIX = 4915;
        /// <summary>
        /// 不能上传空文件!
        /// </summary>
        public const int BUSSINESS_UPLOAD_FILE_SIZE_EMPTY = 4916;
        #endregion
    }
    public class ErrorMessage
    {

        /// <summary>
        /// 数据库服务器错误
        /// </summary>
        public const string SQL_ERROR = "执行数据脚本时出现错误！";
        /// <summary>
        /// 成功时编码
        /// </summary>
        public const string SUCCESS_CODE = "数据操作成功!";
        /// <summary>
        /// 返回数据类型错误
        /// </summary>
        public const string RESPONDATATYPE_ERROR = "返回数据类型错误!";
        /// <summary>
        /// 500服务器错误
        /// </summary>
        public const string SERVER_ERROR = "服务器错误!";

        /// <summary>
        /// 参数异常
        /// </summary>
        public const string SERVER_PARMETER = "参数错误!";
        /// <summary>
        /// 空指针异常
        /// </summary>
        public const string SERVER_NULL_POINTER = "空指针异常!";
        #region 业务数据错误

        #region 登录
        /// <summary>
        /// 租户用户信息重复
        /// </summary>
        public const string BUSINESS_TENANTINFO_REPEAT_CODE = "租户用户信息重复!";

        /// <summary>
        /// 未找到租户用户信息
        /// </summary>
        public const string BUSINESS_NOT_TENANTINFO = "未找到租户用户信息!";

        /// <summary>
        /// 请输入登录信息
        /// </summary>
        public const string BUSINESS_NOT_FOUND_LOGIN = "请输入登录信息!";
        /// <summary>
        /// 请输入用户名
        /// </summary>
        public const string BUSINESS_EMPTY_LOGIN_ACCOUNT = "请输入用户名!";
        /// <summary>
        /// 请输入密码
        /// </summary>
        public const string BUSINESS_EMPTY_LOGIN_PASSWORD = "请输入密码!";
        /// <summary>
        /// 当前用户名不存在!请联系管理员
        /// </summary>
        public const string BUSINESS_EMPTY_NOTFOUND_ACCOUNTINFO = "当前用户名不存在!请联系管理员!";
        /// <summary>
        /// 当前用户密码不正确!请重新输入
        /// </summary>
        public const string BUSINESS_EMPTY_LOGIN_PASSWORD_ERROR = "当前用户密码不正确!请重新输入";
        /// <summary>
        /// 登录令牌未成功生成，请联系管理员!
        /// </summary>
        public const string BUSINESS_EMPTY_LOGIN_TOKEN_ERROR = "登录令牌未成功生成，请联系管理员!";
        /// <summary>
        /// 当前员工基本信息不存在!请联系管理员!
        /// </summary>
        public const string BUSINESS_EMPTY_NOTFOUND_EMPLOYEEINFO = "当前员工基本信息不存在!请联系管理员!";

        /// <summary>
        /// 当前账号登录成功！祝您使用愉快!
        /// </summary>
        public const string BUSINESS_LOGIN_SUCCESSED = "当前账号登录成功！祝您使用愉快!";
        /// <summary>
        /// 未输入账号信息
        /// </summary>
        public const string BUSINESS_LOGIN_SECRET_ERROR = "未输入账号信息!";
        #endregion

        #region 员工基本信息
        /// <summary>
        /// 请输入员工基本数据
        /// </summary>
        public const string BUSINESS_EMPLOYEE_NOTFOUND_INPUT_DATA_ERROR = "请输入员工基本数据!";
        /// <summary>
        /// 员工基本信息重复
        /// </summary>
        public const string BUSINESS_EMPLOYEE_REPEAT_CODE = "员工基本信息重复";
        /// <summary>
        /// 未查询到当前员工的基本信息!
        /// </summary>
        public const string BUSINESS_EMPLOYEE_DB_NOT_FOUND = "未查询到当前员工的基本信息";
        #endregion

        #region 账号
        /// <summary>
        /// 请输入账号信息数据
        /// </summary>
        public const string BUSINESS_ACCOUNT_NOTFOUND_INPUT_DATA_ERROR = "请输入账号信息数据";
        /// <summary>
        /// 账户信息重复
        /// </summary>
        public const string BUSINESS_ACCOUNTINFO_REPEAT_ACCOUNT = "账户信息重复";
        /// <summary>
        /// 未查询到当前账号的基本信息!
        /// </summary>
        public const string BUSINESS_ACCOUNT_DB_NOT_FOUND = "未查询到当前账号的基本信息";
        #endregion

        #region 单位
        /// <summary>
        /// 请输入单位信息数据
        /// </summary>
        public const String BUSINESS_UNITINOF_NOTFOUND_INPUT_DATA_ERROR = "请输入单位信息数据";

        /// <summary>
        /// 账户信息重复
        /// </summary>
        public const string BUSINESS_UNITINFO_REPEAT_ACCOUNT = "单位信息重复";

        /// <summary>
        /// 未查询到单位的基本信息!
        /// </summary>
        public const string BUSINESS_UNITINFO_DB_NOT_FOUND = "未查询到单位的基本信息";
        #endregion

        #region 菜单 
        /// <summary>
        /// 请输入菜单信息数据
        /// </summary>
        public const string BUSINESS_MENU_NOTFOUND_INPUT_DATA_ERROR = "请输入菜单信息数据";
        /// <summary>
        ///菜单信息重复
        /// </summary>
        public const string BUSINESS_MENU_REPEAT_ACCOUNT = "菜单信息重复";
        /// <summary>
        /// 未查询到菜单信息!
        /// </summary>
        public const string BUSINESS_MENU_DB_NOT_FOUND = "未查询到菜单信息";

        /// <summary>
        /// 查询到子菜单，请先删除子菜单然后再删除该菜单！
        /// </summary>
        public const string BUSINESS_MENU_UNREMOVE = "查询到子菜单，请先删除子菜单然后再删除该菜单！";
        #endregion
        #endregion

        /// <summary>
        /// 当前接口不支持当前版本
        /// </summary>
        public const string NOT_FOUND_APIVERSION = "接口不支持当前版本!";

    }

    public class GlobalErrorType
    {
        /// <summary>
        /// 未找到页面输入的数据,请联系管理员！
        /// </summary>
        public const int GLOBAL_NOT_FOUND_INPUT_DATA = 9444;

        /// <summary>
        /// 未查询到当前数据信息!
        /// </summary>
        public const int GLOBAL_NOT_FOUND_DB_DATA = 9404;

        /// <summary>
        /// 当前编码已存在,请更换编码!
        /// </summary>
        public const int GLOBAL_REPEAT_CODE = 9441;

        /// <summary>
        /// 保存数据成功!
        /// </summary>
        public const int GLOBAL_SAVE_SUCCESSINFO = 9420;
        /// <summary>
        /// 保存数据失败!
        /// </summary>
        public const int GLOBAL_SAVE_FAILURE = 9450;
        /// <summary>
        /// 删除数据成功!
        /// </summary>
        public const int GLOBAL_DELETE_SUCCESSINFO = 9406;
        /// <summary>
        /// 删除数据失败!
        /// </summary>
        public const int GLOBAL_DELETE_FAILURE = 9405;
        /// <summary>
        /// 已启用!
        /// </summary>
        public const int GLOBAL_ENABLE_SUCCESSINFO = 9408;
        /// <summary>
        /// 启用失败!
        /// </summary>
        public const int GLOBAL_ENABLE_FAILURE = 9409;
        /// <summary>
        /// 已禁用!
        /// </summary>
        public const int GLOBAL_DISABLE_SUCCESSINFO = 9407;
        /// <summary>
        /// 禁用失败!
        /// </summary>
        public const int GLOBAL_DISABLE_FAILURE = 9410;

        /// <summary>
        /// 语言：{0}已存在!
        /// </summary>
        public const int GLOBAL_LANGUAGE_REPEAT_ERROR = 9411;

        /// <summary>
        /// 名称多语言不能为空!
        /// </summary>
        public const int GLOBAL_RES_LANGUAGE_REPEAT_ERROR = 9440;

        /// <summary>
        /// 已存在相同名称的数据!
        /// </summary>
        public const int GLOBAL_RES_LANGUAGE_REPEAT_NNAME_ERROR = 9100;
    }
} 
